/*
 * Alvin Baldemeca
 * TCSS 305 - Spring 2012
 * Assignment 4 Power Paint
 */


package view.container;


import javax.swing.Action;
import javax.swing.ButtonGroup;
import javax.swing.JToggleButton;
import javax.swing.JToolBar;






/**
 * This class is the tool bar for the Power Paint Program.
 * @author Alvin Baldemeca
 * @version 5/10/2012
 */
@SuppressWarnings("serial")
public class PowerPaintToolBar extends JToolBar
{
  /**
   * The button group for tools.
   */
  private final ButtonGroup my_group = new ButtonGroup();
  
  /**
   * Constructs the tool bar which is a JToolBar for the Power Paint program.
   */
  public PowerPaintToolBar()
  {
    super("PowerPaintToolBar");
  }
  
  /**
   * Creates a toggle button for the tool bar.
   * @param an_action the action to attach to the button
   */
  public void createToggleButton(final Action an_action) 
  {
    final JToggleButton button = new JToggleButton(an_action);
    my_group.add(button);
    add(button);
  }
  
}
